package com.foldingleaf.author.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.foldingleaf.author.mapper.SysCollectionAuthorMapper;
import com.foldingleaf.author.domain.SysCollectionAuthor;
import com.foldingleaf.author.service.ISysCollectionAuthorService;

/**
 * 藏品作者Service业务层处理
 * 
 * @author ajian
 * @date 2022-05-30
 */
@Service
public class SysCollectionAuthorServiceImpl implements ISysCollectionAuthorService 
{
    @Autowired
    private SysCollectionAuthorMapper sysCollectionAuthorMapper;

    /**
     * 查询藏品作者
     * 
     * @param collectionAuthorId 藏品作者主键
     * @return 藏品作者
     */
    @Override
    public SysCollectionAuthor selectSysCollectionAuthorByCollectionAuthorId(Long collectionAuthorId)
    {
        return sysCollectionAuthorMapper.selectSysCollectionAuthorByCollectionAuthorId(collectionAuthorId);
    }

    /**
     * 查询藏品作者列表
     * 
     * @param sysCollectionAuthor 藏品作者
     * @return 藏品作者
     */
    @Override
    public List<SysCollectionAuthor> selectSysCollectionAuthorList(SysCollectionAuthor sysCollectionAuthor)
    {
        return sysCollectionAuthorMapper.selectSysCollectionAuthorList(sysCollectionAuthor);
    }

    /**
     * 新增藏品作者
     * 
     * @param sysCollectionAuthor 藏品作者
     * @return 结果
     */
    @Override
    public int insertSysCollectionAuthor(SysCollectionAuthor sysCollectionAuthor)
    {
        return sysCollectionAuthorMapper.insertSysCollectionAuthor(sysCollectionAuthor);
    }

    /**
     * 修改藏品作者
     * 
     * @param sysCollectionAuthor 藏品作者
     * @return 结果
     */
    @Override
    public int updateSysCollectionAuthor(SysCollectionAuthor sysCollectionAuthor)
    {
        return sysCollectionAuthorMapper.updateSysCollectionAuthor(sysCollectionAuthor);
    }

    /**
     * 批量删除藏品作者
     * 
     * @param collectionAuthorIds 需要删除的藏品作者主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionAuthorByCollectionAuthorIds(Long[] collectionAuthorIds)
    {
        return sysCollectionAuthorMapper.deleteSysCollectionAuthorByCollectionAuthorIds(collectionAuthorIds);
    }

    /**
     * 删除藏品作者信息
     * 
     * @param collectionAuthorId 藏品作者主键
     * @return 结果
     */
    @Override
    public int deleteSysCollectionAuthorByCollectionAuthorId(Long collectionAuthorId)
    {
        return sysCollectionAuthorMapper.deleteSysCollectionAuthorByCollectionAuthorId(collectionAuthorId);
    }
}
